package com.javasm.controller;

import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：MoDebing
 * @Version：1.0
 * @Date：2022-09-04-20:19
 * @Description:
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/getcurrentUserInfo")
    public Object getUserInfo(Authentication authentication){

        return authentication.getPrincipal();
    }

}
